package com.hmall.api.cart;

import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;

@FeignClient(name = "cart-service", path = "/carts")
public interface CartClient {

    @DeleteMapping("{id}")
    void deleteCartItem(@Param("购物车条目id")@PathVariable("id") Long id);

    @DeleteMapping
    void deleteCartItemByIds(@RequestParam("ids") Collection<Long> ids);
}
